package com.hjs.paclouddao.service;

import com.hjs.paclouddao.pojo.File;
import org.springframework.core.io.Resource;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.net.MalformedURLException;
import java.nio.file.Path;
import java.util.List;
import java.util.stream.Stream;

/**
 * @auther hanjinsong
 * @create 2019-08-19 11:57
 */
public interface IFileService {

    int insert(File file);

    File select(Integer id);

    List<String> selectAllName();

    void init();

    void store(MultipartFile file) throws IOException;

    Stream<Path> loadAll() throws IOException;

    Path load(String filename);

    Resource loadAsResource(String filename) throws MalformedURLException;

    void deleteAll();

}
